package x.y.z.mapper;

import org.springframework.jdbc.core.RowMapper;
import x.y.z.bean.KeyValue;

import java.sql.ResultSet;
import java.sql.SQLException;

public class KeyValueMapper implements RowMapper<KeyValue> {
    @Override
    public KeyValue mapRow(ResultSet resultSet, int i) throws SQLException {

        KeyValue result = new KeyValue();
        result.setId(resultSet.getLong("id"));
        result.setTkey(resultSet.getString("tkey"));
        result.setTval(resultSet.getString("tval"));


        return result;
    }
}
